<style>
.typeitem{	
	text-align:left;
	padding:0.5rem;
	background:#fff;
	background: var(--s-color-bg-primary,#fff);
    border: 1px solid rgba(0,0,0,.08);
    border: 1px solid var(--s-color-border-tertiary,rgba(0,0,0,.08));
}
.typeitem.active{
    border: 1px solid {{main.syscolor || '#7c1cc9'}};
}
</style>
<div class="fui-cell-group radius">
	<div ng-repeat="item in pagedata.list" class="fui-cell" style="padding:0.35rem;">
		<div ng-click="pagedata.delgoods(item.id)" style="position: absolute;top:0;right:0.5rem">
			<i class="icon icon-jian bold red"></i>
		</div>
		<div ng-click="access_json('/mcpitem//id='+item.id);" class="fui-cell-lable" style="width:auto;padding-right: 0.3rem;">
			<img style="border-radius: 100%;width:3.3rem;height:3.3rem" ng-src="{{tomedia(item.agent.logo) || '../addons/jy_agentmcp/resource/images/goods.png'}}" />
		</div>
		<div ng-click="access_json('/mcpitem//id='+item.id);" class="fui-cell-text" style="">
			<div class="bold">{{item.title||'设备名称'}}</div>
		</div>
		<div class="fui-cell-remark noremark" style="padding-left:0;width:4rem;padding-top: 0.5rem;">
			<div class="btn btn-sm btn-success" ng-click="access_json('/mcpitem//id='+item.id);" style="background: #eaeef9;color:#354fe2;border-radius:0.2rem">详情</div>
		</div>
	</div>
	<div class="content-empty" ng-show="!pagedata.list || pagedata.list.length == 0 ">
		<img style="border-radius: 100%;width:2rem;height:2rem" src="../addons/jy_agentmcp/resource/images/goods.png" />
		<div style="padding-top:0.3rem;color: #999;font-size: .75rem">您暂时没有添加MCP设备</div>
	</div>
</div>
<script>
scope.tool.get_list('jy_agentmcp/index/getlist/',true);
scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_agentmcp/index/getlist/');
}
scope.pagedata.peigoodscode=function(){
   scope.post_json('jy_agentmcp/index/peigoodscode/',scope.pagedata.post);
} 
scope.pagedata.delgoods=function(id){
	scope.confirm({
		'message':'确认要删除设备吗？删除后将无法找回！得重新添加！',
		'success':function(){
			scope.post_json('jy_agentmcp/index/delgoods/',{'id':id});
		},
		'fail':function(){}
	});
}
</script>